/**
 * 
 */
package com.music.common.service;

import java.io.File;
import java.io.IOException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.farng.mp3.TagException;

import com.music.common.entity.Media;
import com.music.common.errorhandler.DaoException;
import com.music.common.errorhandler.MemusicException;
import com.music.common.presentation.forms.MediaForm;

/**
 * @author rpatil
 *
 */
public interface IMediaService {
	/**
	 * @param userName
	 * @return Media List
	 */
	public List getAllMediaDetailByUserName(String userName, HttpServletRequest request) throws MemusicException;
	
	/**
	 * @param mediaId
	 * @return
	 * @throws IOException
	 * @throws TagException
	 */
	public Media getMediaById(Integer mediaId) throws IOException, TagException;
	
	/**
	 * @param directory
	 */
	public List<Media> getMediaListByDirectory(String directory, HttpServletRequest request) throws IOException, TagException, DaoException;
	
	/**
	 * @param directory
	 */
	public Media getMediaDetailFromFile(File file, HttpServletRequest request) throws IOException, TagException, DaoException;
	
	/**
	 * @param request
	 * @return
	 * @throws DaoException
	 */
	public Integer getMediaCounter(HttpServletRequest request) throws DaoException;
	
	/**
	 * @param media
	 * @param request
	 * @throws DaoException
	 */
	public Media updateMedia(MediaForm media, HttpServletRequest request) throws DaoException;
}
